x86/pv: Move x86/trace.c to x86/pv/trace.c
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 20 Sep 2021 14:02:32 +0000 (15:02 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 21 Sep 2021 18:41:12 +0000 (19:41 +0100)
commit8aae4f376ca59174a25938e95dc41e9883ee675c
tree4fa5f77b0fee3b7c749a1d3b79d9e25f4a07e960
parent91bac8ad7c062e2779b97649eb0dca9035bc56be
x86/pv: Move x86/trace.c to x86/pv/trace.c

This entire file is pv-only, and not excluded from the build by
CONFIG_TRACEBUFFER.  Move it into the pv/ directory, build it conditionally,
and drop unused includes.

Also move the contents of asm/trace.h to asm/pv/trace.h to avoid the functions
being declared across the entire hypervisor.

One caller in fixup_page_fault() is effectively PV only, but is not subject to
dead code elimination.  Add an additional IS_ENABLED(CONFIG_PV) to keep the
build happy.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/Makefile
xen/arch/x86/pv/Makefile
xen/arch/x86/pv/emul-inv-op.c
xen/arch/x86/pv/emul-priv-op.c
xen/arch/x86/pv/ro-page-fault.c
xen/arch/x86/pv/trace.c [new file with mode: 0644]
xen/arch/x86/pv/traps.c
xen/arch/x86/trace.c [deleted file]
xen/arch/x86/traps.c
xen/include/asm-x86/pv/trace.h [new file with mode: 0644]
xen/include/asm-x86/trace.h